
package com.pmcc.core.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.utils.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;


/**
 * 组织管理
 * Created by tomas on 2018/4/9.
 */
@Entity
@Table(name = "sys_organization")
public class Organization extends UUIDEntity {

    @Column(name = "code")
    private String code;//机构编号

    @Column(name = "name")
    private String name;//机构中文名称

    @Column(name = "org_no")
    private String orgNo;//机构号

    @Column(name = "parent_id")
    private String parentId;//上级机构ID

    @Column(name = "parent_code")
    private String parentCode;//上级机构编码

    @Column(name = "parent_name")
    private String parentName;//上级机构名字

    @Column(name = "level")
    private Integer level;//树形层级

    @Column(name = "sequence")
    private Integer sequence;//排序编号

    @Column(name = "fettle")
    private String fettle;//状态

    @Column(name = "create_id")
    private String createId;//创建人

    @Column(name = "creator")
    private String creator;//创建人名称

    @Column(name = "create_time")
    private Date createTime;//创建时间

    @Column(name = "remark")
    private String remark;//备注


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getOrgNo() {
        return orgNo;
    }

    public void setOrgNo(String orgNo) {
        this.orgNo = orgNo;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getFettle() {
        return fettle;
    }

    public void setFettle(String fettle) {
        this.fettle = fettle;
    }

    public String getCreateId() {
        return createId;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }
    @JsonSerialize(using = DateTimeFormat.class)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }
}
